<?php
//to render shopping cart total and article count in each page
require("storescripts/cart_script.php");
//create sessions for user login
require("storescripts/session.php");
//display_account
require("storescripts/display_account_script.php");

if(!isset($_SESSION["customer"])) {
	header("location: customer_login.php");
	exit();
} 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My Account</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />

</head>
<body>
<!-- Shell -->
<div class="shell">
  <!-- Header -->
  <div id="header">
    <h1 id="logo"><a href="index.php">Luvo Fashion</a></h1>
    <!-- Cart -->
    <div id="cart"> <a href="cart.php" class="cart-link">Your Shopping Cart</a>
      <div class="cl">&nbsp;</div>
      <span>Articles: <strong><?php echo $cartArticles;?></strong></span> &nbsp;<span><strong><?php echo $cartTotal;?></strong></span> 
	</div>
    <!-- End Cart -->
    <!-- Navigation -->
    <div id="navigation">
      <ul>
        <li><a href="index.php">Home</a></li>
		<li><a href="gallery.php">Gallery</a></li>
        <li><a href="about_us.php">About Us</a></li>
        <li><a href="faq.php">FAQ</a></li>
        <li><a href="contact.php">Contact</a></li>
		<li><a href="account.php" class="active">My Account</a></li>
      </ul>
    </div>
    <!-- End Navigation -->
  </div>
  <!-- End Header -->
  <!-- Main -->
  <div id="main">
    <div class="cl">&nbsp;</div>
    <!-- Content -->
    <div id="content">
      		<div style="margin:10px; text-align:left; line-height: 2.5em;">
			<table>
			<?php echo $customerDetails;?>
			</table>
			</div>
    </div>
    <!-- End Content -->
    <!-- Sidebar -->
    <div id="sidebar">
      <!-- Login/Register -->
<!-- if no user log on show below-->
      <div class="box login">
        <h2>User Account<span></span></h2>
        <div align="center"class="box-content">
          <form name="loginReg">
			<?php check_logon(); ?>
          </form>
        </div>
      </div>
      <!-- End Login -->
      <!-- Categories -->
      <div style="min-height:190px;" class="box categories">
        <h2>Actions<span></span></h2>
        <div class="box-content">
          <ul>
			<li><a href="account.php">Account Overview</a></li>
            <li><a href="edit_account.php">Edit Account</a></li>
			<li class = "last"><a href="delete_account.php">Delete Account</a></li>
          </ul>
        </div>
      </div>
      <!-- End Categories -->
    </div>
    <!-- End Sidebar -->
    <div class="cl">&nbsp;</div>
  </div>
  <!-- End Main -->
  
  <!-- Footer -->
  <?php include_once("template_footer.php"); ?>
  <!-- End Footer -->
</div>
<!-- End Shell -->
</body>
</html>
